<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .wrap{
            width: 300px;
            height: 300px;
            background: pink;

            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }

        .inner{
            width: 200px;
            height: 200px;
            background: gray;

            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }

        .test{
            width: 100px;
            height: 100px;
            background: black;

            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            margin: auto;
        }
    </style>
</head>
<body>
    <div id="app">
       <div class="wrap" @click="wrapFn">
           <div class="inner" @click="innerFn">
               <!--如果是事件回调加()代表要传参-->
               <div class="test" @click.stop="testFn(1,$event)">

               </div>
           </div>
       </div>
    </div>
</body>
<script src="../../js/vue.js"></script>
<script>
    new Vue({
        el:"#app",
        methods:{
            testFn(num,ev){console.log(ev)},
            innerFn(){console.log("innerFn")},
            wrapFn(){console.log("wrapFn")}
        }
    })
    
</script>
</html>